package com.glory.huaweipda.adapter

import androidx.databinding.BindingAdapter
import com.flyco.tablayout.CommonTabLayout
import com.flyco.tablayout.listener.CustomTabEntity
import com.flyco.tablayout.listener.OnTabSelectListener

object TabLayoutAdapter {

    @BindingAdapter(value = ["items"], requireAll = false)
    @JvmStatic
    fun setTabText(tabLayout: CommonTabLayout, items: ArrayList<CustomTabEntity>) {
        tabLayout.setTabData(items)
    }


    @BindingAdapter(value = ["tabItemClick"], requireAll = false)
    @JvmStatic
    fun tabItemClick(tabLayout: CommonTabLayout, listener: OnTabSelectListener) {
        tabLayout.setOnTabSelectListener(listener)
    }

}